var UserMgtService = (function () {

	var userServiceBase = "/services/rest/identitymgt";
	var jsonContentType = "application/json";

	registerUser = function (user, callback) {
		$.ajax({
			type: "POST",
			url: userServiceBase + "/users",
			headers: {
				'Accept': 'application/json',
				'Content-Type': 'application/json'
			},
			data: JSON.stringify(user),
			contentType: jsonContentType,
			dataType: "json",
			processdata: true,
			success: function (json) {
				alert(json);
				callback(json);
			}
		});
	}

	return {
		registerUser: registerUser
	};

})();